{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "c3e90969-24cc-42d6-a7b4-530f9a1ae21d",
   "metadata": {},
   "source": [
    "# Data Cleaning and Feature Engineering"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "23eed968-f671-4691-b2e5-fec79c9a2c28",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "import re"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "baccf51f-ccae-4be9-9306-212932092b04",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ASUS TUF Gaming F15 - AI Powered Gaming Core i...</td>\n",
       "      <td>₹51,990</td>\n",
       "      <td>4.3</td>\n",
       "      <td>1,768 Ratings &amp; 177 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...</td>\n",
       "      <td>₹26,990</td>\n",
       "      <td>4.1</td>\n",
       "      <td>2,776 Ratings &amp; 227 Reviews</td>\n",
       "      <td>AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...</td>\n",
       "      <td>₹87,990</td>\n",
       "      <td>4.7</td>\n",
       "      <td>3,207 Ratings &amp; 252 Reviews</td>\n",
       "      <td>Apple M2 Processor8 GB Unified Memory RAMMac O...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infinix INBook Y1 Plus Intel Core i3 10th Gen ...</td>\n",
       "      <td>₹23,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>3,042 Ratings &amp; 387 Reviews</td>\n",
       "      <td>Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       Product Title Product Price  \\\n",
       "0  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "1  ASUS TUF Gaming F15 - AI Powered Gaming Core i...       ₹51,990   \n",
       "2  HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...       ₹26,990   \n",
       "3  APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...       ₹87,990   \n",
       "4  Infinix INBook Y1 Plus Intel Core i3 10th Gen ...       ₹23,990   \n",
       "\n",
       "   Product Rating               Product Review  \\\n",
       "0             4.2    773 Ratings & 207 Reviews   \n",
       "1             4.3  1,768 Ratings & 177 Reviews   \n",
       "2             4.1  2,776 Ratings & 227 Reviews   \n",
       "3             4.7  3,207 Ratings & 252 Reviews   \n",
       "4             4.2  3,042 Ratings & 387 Reviews   \n",
       "\n",
       "                                     Product Feature  \n",
       "0  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  \n",
       "1  Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...  \n",
       "2  AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...  \n",
       "3  Apple M2 Processor8 GB Unified Memory RAMMac O...  \n",
       "4  Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv(\"data/laptop_raw_data.csv\")\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c6a6c3c3-0fda-40f7-a137-da18f3d1673b",
   "metadata": {},
   "source": [
    "## Deriving New Columns from Existing Columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "2b23ee32-a797-45e1-a5de-3b11e052f7e9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>[Primebook]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ASUS TUF Gaming F15 - AI Powered Gaming Core i...</td>\n",
       "      <td>₹51,990</td>\n",
       "      <td>4.3</td>\n",
       "      <td>1,768 Ratings &amp; 177 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...</td>\n",
       "      <td>[ASUS]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...</td>\n",
       "      <td>₹26,990</td>\n",
       "      <td>4.1</td>\n",
       "      <td>2,776 Ratings &amp; 227 Reviews</td>\n",
       "      <td>AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...</td>\n",
       "      <td>[HP]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...</td>\n",
       "      <td>₹87,990</td>\n",
       "      <td>4.7</td>\n",
       "      <td>3,207 Ratings &amp; 252 Reviews</td>\n",
       "      <td>Apple M2 Processor8 GB Unified Memory RAMMac O...</td>\n",
       "      <td>[APPLE]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infinix INBook Y1 Plus Intel Core i3 10th Gen ...</td>\n",
       "      <td>₹23,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>3,042 Ratings &amp; 387 Reviews</td>\n",
       "      <td>Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...</td>\n",
       "      <td>[Infinix]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       Product Title Product Price  \\\n",
       "0  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "1  ASUS TUF Gaming F15 - AI Powered Gaming Core i...       ₹51,990   \n",
       "2  HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...       ₹26,990   \n",
       "3  APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...       ₹87,990   \n",
       "4  Infinix INBook Y1 Plus Intel Core i3 10th Gen ...       ₹23,990   \n",
       "\n",
       "   Product Rating               Product Review  \\\n",
       "0             4.2    773 Ratings & 207 Reviews   \n",
       "1             4.3  1,768 Ratings & 177 Reviews   \n",
       "2             4.1  2,776 Ratings & 227 Reviews   \n",
       "3             4.7  3,207 Ratings & 252 Reviews   \n",
       "4             4.2  3,042 Ratings & 387 Reviews   \n",
       "\n",
       "                                     Product Feature        Brand  \n",
       "0  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  [Primebook]  \n",
       "1  Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...       [ASUS]  \n",
       "2  AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...         [HP]  \n",
       "3  Apple M2 Processor8 GB Unified Memory RAMMac O...      [APPLE]  \n",
       "4  Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...    [Infinix]  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Brand\n",
    "\n",
    "regex = r'^\\w+'\n",
    "\n",
    "df['Brand'] = df['Product Title'].apply(lambda x : re.findall(regex, x))\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "885f92d1-b627-4b5c-8d20-ce7ade78b88f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "      <th>Processor</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>[Primebook]</td>\n",
       "      <td>[MediaTek MT8183 Processor]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ASUS TUF Gaming F15 - AI Powered Gaming Core i...</td>\n",
       "      <td>₹51,990</td>\n",
       "      <td>4.3</td>\n",
       "      <td>1,768 Ratings &amp; 177 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...</td>\n",
       "      <td>[ASUS]</td>\n",
       "      <td>[Intel Core i5 Processor]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...</td>\n",
       "      <td>₹26,990</td>\n",
       "      <td>4.1</td>\n",
       "      <td>2,776 Ratings &amp; 227 Reviews</td>\n",
       "      <td>AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...</td>\n",
       "      <td>[HP]</td>\n",
       "      <td>[AMD Athlon Dual Core Processor]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...</td>\n",
       "      <td>₹87,990</td>\n",
       "      <td>4.7</td>\n",
       "      <td>3,207 Ratings &amp; 252 Reviews</td>\n",
       "      <td>Apple M2 Processor8 GB Unified Memory RAMMac O...</td>\n",
       "      <td>[APPLE]</td>\n",
       "      <td>[Apple M2 Processor]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infinix INBook Y1 Plus Intel Core i3 10th Gen ...</td>\n",
       "      <td>₹23,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>3,042 Ratings &amp; 387 Reviews</td>\n",
       "      <td>Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...</td>\n",
       "      <td>[Infinix]</td>\n",
       "      <td>[Intel Core i3 Processor]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       Product Title Product Price  \\\n",
       "0  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "1  ASUS TUF Gaming F15 - AI Powered Gaming Core i...       ₹51,990   \n",
       "2  HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...       ₹26,990   \n",
       "3  APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...       ₹87,990   \n",
       "4  Infinix INBook Y1 Plus Intel Core i3 10th Gen ...       ₹23,990   \n",
       "\n",
       "   Product Rating               Product Review  \\\n",
       "0             4.2    773 Ratings & 207 Reviews   \n",
       "1             4.3  1,768 Ratings & 177 Reviews   \n",
       "2             4.1  2,776 Ratings & 227 Reviews   \n",
       "3             4.7  3,207 Ratings & 252 Reviews   \n",
       "4             4.2  3,042 Ratings & 387 Reviews   \n",
       "\n",
       "                                     Product Feature        Brand  \\\n",
       "0  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  [Primebook]   \n",
       "1  Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...       [ASUS]   \n",
       "2  AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...         [HP]   \n",
       "3  Apple M2 Processor8 GB Unified Memory RAMMac O...      [APPLE]   \n",
       "4  Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...    [Infinix]   \n",
       "\n",
       "                          Processor  \n",
       "0       [MediaTek MT8183 Processor]  \n",
       "1         [Intel Core i5 Processor]  \n",
       "2  [AMD Athlon Dual Core Processor]  \n",
       "3              [Apple M2 Processor]  \n",
       "4         [Intel Core i3 Processor]  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Processor Information\n",
    "\n",
    "regex = r'(?:MediaTek|AMD|Intel|Apple)[\\s\\w]+Processor'\n",
    "\n",
    "df['Processor'] = df['Product Feature'].apply(lambda x : re.findall(regex, x))\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "9cd526f0-da07-45be-81e7-807ade7397cc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "      <th>Processor</th>\n",
       "      <th>RAM</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>[Primebook]</td>\n",
       "      <td>[MediaTek MT8183 Processor]</td>\n",
       "      <td>[4 GB LPDDR4 RAM]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ASUS TUF Gaming F15 - AI Powered Gaming Core i...</td>\n",
       "      <td>₹51,990</td>\n",
       "      <td>4.3</td>\n",
       "      <td>1,768 Ratings &amp; 177 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...</td>\n",
       "      <td>[ASUS]</td>\n",
       "      <td>[Intel Core i5 Processor]</td>\n",
       "      <td>[(11th Gen)8 GB DDR4 RAM]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...</td>\n",
       "      <td>₹26,990</td>\n",
       "      <td>4.1</td>\n",
       "      <td>2,776 Ratings &amp; 227 Reviews</td>\n",
       "      <td>AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...</td>\n",
       "      <td>[HP]</td>\n",
       "      <td>[AMD Athlon Dual Core Processor]</td>\n",
       "      <td>[8 GB DDR4 RAM]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...</td>\n",
       "      <td>₹87,990</td>\n",
       "      <td>4.7</td>\n",
       "      <td>3,207 Ratings &amp; 252 Reviews</td>\n",
       "      <td>Apple M2 Processor8 GB Unified Memory RAMMac O...</td>\n",
       "      <td>[APPLE]</td>\n",
       "      <td>[Apple M2 Processor]</td>\n",
       "      <td>[8 GB Unified Memory RAM]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infinix INBook Y1 Plus Intel Core i3 10th Gen ...</td>\n",
       "      <td>₹23,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>3,042 Ratings &amp; 387 Reviews</td>\n",
       "      <td>Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...</td>\n",
       "      <td>[Infinix]</td>\n",
       "      <td>[Intel Core i3 Processor]</td>\n",
       "      <td>[(10th Gen)8 GB LPDDR4X RAM]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       Product Title Product Price  \\\n",
       "0  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "1  ASUS TUF Gaming F15 - AI Powered Gaming Core i...       ₹51,990   \n",
       "2  HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...       ₹26,990   \n",
       "3  APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...       ₹87,990   \n",
       "4  Infinix INBook Y1 Plus Intel Core i3 10th Gen ...       ₹23,990   \n",
       "\n",
       "   Product Rating               Product Review  \\\n",
       "0             4.2    773 Ratings & 207 Reviews   \n",
       "1             4.3  1,768 Ratings & 177 Reviews   \n",
       "2             4.1  2,776 Ratings & 227 Reviews   \n",
       "3             4.7  3,207 Ratings & 252 Reviews   \n",
       "4             4.2  3,042 Ratings & 387 Reviews   \n",
       "\n",
       "                                     Product Feature        Brand  \\\n",
       "0  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  [Primebook]   \n",
       "1  Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...       [ASUS]   \n",
       "2  AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...         [HP]   \n",
       "3  Apple M2 Processor8 GB Unified Memory RAMMac O...      [APPLE]   \n",
       "4  Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...    [Infinix]   \n",
       "\n",
       "                          Processor                           RAM  \n",
       "0       [MediaTek MT8183 Processor]             [4 GB LPDDR4 RAM]  \n",
       "1         [Intel Core i5 Processor]     [(11th Gen)8 GB DDR4 RAM]  \n",
       "2  [AMD Athlon Dual Core Processor]               [8 GB DDR4 RAM]  \n",
       "3              [Apple M2 Processor]     [8 GB Unified Memory RAM]  \n",
       "4         [Intel Core i3 Processor]  [(10th Gen)8 GB LPDDR4X RAM]  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# RAM Information\n",
    "\n",
    "regex = r'(?:\\([\\w\\s]+\\))?\\d+\\sGB[\\s\\w]+RAM'\n",
    "\n",
    "df['RAM'] = df['Product Feature'].apply(lambda x : re.findall(regex, x))\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "4425a404-dd06-4150-afda-5c43d82087c6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "      <th>Processor</th>\n",
       "      <th>RAM</th>\n",
       "      <th>OS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>[Primebook]</td>\n",
       "      <td>[MediaTek MT8183 Processor]</td>\n",
       "      <td>[4 GB LPDDR4 RAM]</td>\n",
       "      <td>[Android Operating System]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ASUS TUF Gaming F15 - AI Powered Gaming Core i...</td>\n",
       "      <td>₹51,990</td>\n",
       "      <td>4.3</td>\n",
       "      <td>1,768 Ratings &amp; 177 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...</td>\n",
       "      <td>[ASUS]</td>\n",
       "      <td>[Intel Core i5 Processor]</td>\n",
       "      <td>[(11th Gen)8 GB DDR4 RAM]</td>\n",
       "      <td>[Windows 11 Operating System]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...</td>\n",
       "      <td>₹26,990</td>\n",
       "      <td>4.1</td>\n",
       "      <td>2,776 Ratings &amp; 227 Reviews</td>\n",
       "      <td>AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...</td>\n",
       "      <td>[HP]</td>\n",
       "      <td>[AMD Athlon Dual Core Processor]</td>\n",
       "      <td>[8 GB DDR4 RAM]</td>\n",
       "      <td>[Windows 11 Operating System]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...</td>\n",
       "      <td>₹87,990</td>\n",
       "      <td>4.7</td>\n",
       "      <td>3,207 Ratings &amp; 252 Reviews</td>\n",
       "      <td>Apple M2 Processor8 GB Unified Memory RAMMac O...</td>\n",
       "      <td>[APPLE]</td>\n",
       "      <td>[Apple M2 Processor]</td>\n",
       "      <td>[8 GB Unified Memory RAM]</td>\n",
       "      <td>[Mac OS Operating System]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infinix INBook Y1 Plus Intel Core i3 10th Gen ...</td>\n",
       "      <td>₹23,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>3,042 Ratings &amp; 387 Reviews</td>\n",
       "      <td>Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...</td>\n",
       "      <td>[Infinix]</td>\n",
       "      <td>[Intel Core i3 Processor]</td>\n",
       "      <td>[(10th Gen)8 GB LPDDR4X RAM]</td>\n",
       "      <td>[64 bit Windows 11 Operating System]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       Product Title Product Price  \\\n",
       "0  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "1  ASUS TUF Gaming F15 - AI Powered Gaming Core i...       ₹51,990   \n",
       "2  HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...       ₹26,990   \n",
       "3  APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...       ₹87,990   \n",
       "4  Infinix INBook Y1 Plus Intel Core i3 10th Gen ...       ₹23,990   \n",
       "\n",
       "   Product Rating               Product Review  \\\n",
       "0             4.2    773 Ratings & 207 Reviews   \n",
       "1             4.3  1,768 Ratings & 177 Reviews   \n",
       "2             4.1  2,776 Ratings & 227 Reviews   \n",
       "3             4.7  3,207 Ratings & 252 Reviews   \n",
       "4             4.2  3,042 Ratings & 387 Reviews   \n",
       "\n",
       "                                     Product Feature        Brand  \\\n",
       "0  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  [Primebook]   \n",
       "1  Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...       [ASUS]   \n",
       "2  AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...         [HP]   \n",
       "3  Apple M2 Processor8 GB Unified Memory RAMMac O...      [APPLE]   \n",
       "4  Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...    [Infinix]   \n",
       "\n",
       "                          Processor                           RAM  \\\n",
       "0       [MediaTek MT8183 Processor]             [4 GB LPDDR4 RAM]   \n",
       "1         [Intel Core i5 Processor]     [(11th Gen)8 GB DDR4 RAM]   \n",
       "2  [AMD Athlon Dual Core Processor]               [8 GB DDR4 RAM]   \n",
       "3              [Apple M2 Processor]     [8 GB Unified Memory RAM]   \n",
       "4         [Intel Core i3 Processor]  [(10th Gen)8 GB LPDDR4X RAM]   \n",
       "\n",
       "                                     OS  \n",
       "0            [Android Operating System]  \n",
       "1         [Windows 11 Operating System]  \n",
       "2         [Windows 11 Operating System]  \n",
       "3             [Mac OS Operating System]  \n",
       "4  [64 bit Windows 11 Operating System]  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# OS \n",
    "\n",
    "regex = r'(?:\\d+\\sbit|Android|Mac|Window|DOS)[\\s\\w]+Operating System'\n",
    "\n",
    "df['OS'] = df['Product Feature'].apply(lambda x : re.findall(regex, x))\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "7bc0f5f1-1ca9-444c-ab57-b7e7ead12786",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "      <th>Processor</th>\n",
       "      <th>RAM</th>\n",
       "      <th>OS</th>\n",
       "      <th>Storage</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>[Primebook]</td>\n",
       "      <td>[MediaTek MT8183 Processor]</td>\n",
       "      <td>[4 GB LPDDR4 RAM]</td>\n",
       "      <td>[Android Operating System]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ASUS TUF Gaming F15 - AI Powered Gaming Core i...</td>\n",
       "      <td>₹51,990</td>\n",
       "      <td>4.3</td>\n",
       "      <td>1,768 Ratings &amp; 177 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...</td>\n",
       "      <td>[ASUS]</td>\n",
       "      <td>[Intel Core i5 Processor]</td>\n",
       "      <td>[(11th Gen)8 GB DDR4 RAM]</td>\n",
       "      <td>[Windows 11 Operating System]</td>\n",
       "      <td>[512 GB SSD]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...</td>\n",
       "      <td>₹26,990</td>\n",
       "      <td>4.1</td>\n",
       "      <td>2,776 Ratings &amp; 227 Reviews</td>\n",
       "      <td>AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...</td>\n",
       "      <td>[HP]</td>\n",
       "      <td>[AMD Athlon Dual Core Processor]</td>\n",
       "      <td>[8 GB DDR4 RAM]</td>\n",
       "      <td>[Windows 11 Operating System]</td>\n",
       "      <td>[512 GB SSD]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...</td>\n",
       "      <td>₹87,990</td>\n",
       "      <td>4.7</td>\n",
       "      <td>3,207 Ratings &amp; 252 Reviews</td>\n",
       "      <td>Apple M2 Processor8 GB Unified Memory RAMMac O...</td>\n",
       "      <td>[APPLE]</td>\n",
       "      <td>[Apple M2 Processor]</td>\n",
       "      <td>[8 GB Unified Memory RAM]</td>\n",
       "      <td>[Mac OS Operating System]</td>\n",
       "      <td>[256 GB SSD]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infinix INBook Y1 Plus Intel Core i3 10th Gen ...</td>\n",
       "      <td>₹23,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>3,042 Ratings &amp; 387 Reviews</td>\n",
       "      <td>Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...</td>\n",
       "      <td>[Infinix]</td>\n",
       "      <td>[Intel Core i3 Processor]</td>\n",
       "      <td>[(10th Gen)8 GB LPDDR4X RAM]</td>\n",
       "      <td>[64 bit Windows 11 Operating System]</td>\n",
       "      <td>[512 GB SSD]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       Product Title Product Price  \\\n",
       "0  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "1  ASUS TUF Gaming F15 - AI Powered Gaming Core i...       ₹51,990   \n",
       "2  HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...       ₹26,990   \n",
       "3  APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...       ₹87,990   \n",
       "4  Infinix INBook Y1 Plus Intel Core i3 10th Gen ...       ₹23,990   \n",
       "\n",
       "   Product Rating               Product Review  \\\n",
       "0             4.2    773 Ratings & 207 Reviews   \n",
       "1             4.3  1,768 Ratings & 177 Reviews   \n",
       "2             4.1  2,776 Ratings & 227 Reviews   \n",
       "3             4.7  3,207 Ratings & 252 Reviews   \n",
       "4             4.2  3,042 Ratings & 387 Reviews   \n",
       "\n",
       "                                     Product Feature        Brand  \\\n",
       "0  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  [Primebook]   \n",
       "1  Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...       [ASUS]   \n",
       "2  AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...         [HP]   \n",
       "3  Apple M2 Processor8 GB Unified Memory RAMMac O...      [APPLE]   \n",
       "4  Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...    [Infinix]   \n",
       "\n",
       "                          Processor                           RAM  \\\n",
       "0       [MediaTek MT8183 Processor]             [4 GB LPDDR4 RAM]   \n",
       "1         [Intel Core i5 Processor]     [(11th Gen)8 GB DDR4 RAM]   \n",
       "2  [AMD Athlon Dual Core Processor]               [8 GB DDR4 RAM]   \n",
       "3              [Apple M2 Processor]     [8 GB Unified Memory RAM]   \n",
       "4         [Intel Core i3 Processor]  [(10th Gen)8 GB LPDDR4X RAM]   \n",
       "\n",
       "                                     OS       Storage  \n",
       "0            [Android Operating System]            []  \n",
       "1         [Windows 11 Operating System]  [512 GB SSD]  \n",
       "2         [Windows 11 Operating System]  [512 GB SSD]  \n",
       "3             [Mac OS Operating System]  [256 GB SSD]  \n",
       "4  [64 bit Windows 11 Operating System]  [512 GB SSD]  "
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Storage\n",
    "\n",
    "regex = r'[\\d]+\\s(?:GB|TB)\\s(?:HDD|SSD)'\n",
    "\n",
    "df['Storage'] = df['Product Feature'].apply(lambda x : re.findall(regex, x))\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "9e391eb5-6581-4e57-9d4b-65907ad41d44",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "      <th>Processor</th>\n",
       "      <th>RAM</th>\n",
       "      <th>OS</th>\n",
       "      <th>Storage</th>\n",
       "      <th>Display</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>[Primebook]</td>\n",
       "      <td>[MediaTek MT8183 Processor]</td>\n",
       "      <td>[4 GB LPDDR4 RAM]</td>\n",
       "      <td>[Android Operating System]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[29.46 cm (11.6 Inch) Display]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ASUS TUF Gaming F15 - AI Powered Gaming Core i...</td>\n",
       "      <td>₹51,990</td>\n",
       "      <td>4.3</td>\n",
       "      <td>1,768 Ratings &amp; 177 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...</td>\n",
       "      <td>[ASUS]</td>\n",
       "      <td>[Intel Core i5 Processor]</td>\n",
       "      <td>[(11th Gen)8 GB DDR4 RAM]</td>\n",
       "      <td>[Windows 11 Operating System]</td>\n",
       "      <td>[512 GB SSD]</td>\n",
       "      <td>[39.62 cm (15.6 Inch) Display]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...</td>\n",
       "      <td>₹26,990</td>\n",
       "      <td>4.1</td>\n",
       "      <td>2,776 Ratings &amp; 227 Reviews</td>\n",
       "      <td>AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...</td>\n",
       "      <td>[HP]</td>\n",
       "      <td>[AMD Athlon Dual Core Processor]</td>\n",
       "      <td>[8 GB DDR4 RAM]</td>\n",
       "      <td>[Windows 11 Operating System]</td>\n",
       "      <td>[512 GB SSD]</td>\n",
       "      <td>[39.62 cm (15.6 Inch) Display]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...</td>\n",
       "      <td>₹87,990</td>\n",
       "      <td>4.7</td>\n",
       "      <td>3,207 Ratings &amp; 252 Reviews</td>\n",
       "      <td>Apple M2 Processor8 GB Unified Memory RAMMac O...</td>\n",
       "      <td>[APPLE]</td>\n",
       "      <td>[Apple M2 Processor]</td>\n",
       "      <td>[8 GB Unified Memory RAM]</td>\n",
       "      <td>[Mac OS Operating System]</td>\n",
       "      <td>[256 GB SSD]</td>\n",
       "      <td>[34.54 cm (13.6 Inch) Display]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infinix INBook Y1 Plus Intel Core i3 10th Gen ...</td>\n",
       "      <td>₹23,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>3,042 Ratings &amp; 387 Reviews</td>\n",
       "      <td>Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...</td>\n",
       "      <td>[Infinix]</td>\n",
       "      <td>[Intel Core i3 Processor]</td>\n",
       "      <td>[(10th Gen)8 GB LPDDR4X RAM]</td>\n",
       "      <td>[64 bit Windows 11 Operating System]</td>\n",
       "      <td>[512 GB SSD]</td>\n",
       "      <td>[39.62 cm (15.6 inch) Display]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       Product Title Product Price  \\\n",
       "0  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "1  ASUS TUF Gaming F15 - AI Powered Gaming Core i...       ₹51,990   \n",
       "2  HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...       ₹26,990   \n",
       "3  APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...       ₹87,990   \n",
       "4  Infinix INBook Y1 Plus Intel Core i3 10th Gen ...       ₹23,990   \n",
       "\n",
       "   Product Rating               Product Review  \\\n",
       "0             4.2    773 Ratings & 207 Reviews   \n",
       "1             4.3  1,768 Ratings & 177 Reviews   \n",
       "2             4.1  2,776 Ratings & 227 Reviews   \n",
       "3             4.7  3,207 Ratings & 252 Reviews   \n",
       "4             4.2  3,042 Ratings & 387 Reviews   \n",
       "\n",
       "                                     Product Feature        Brand  \\\n",
       "0  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  [Primebook]   \n",
       "1  Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...       [ASUS]   \n",
       "2  AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...         [HP]   \n",
       "3  Apple M2 Processor8 GB Unified Memory RAMMac O...      [APPLE]   \n",
       "4  Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...    [Infinix]   \n",
       "\n",
       "                          Processor                           RAM  \\\n",
       "0       [MediaTek MT8183 Processor]             [4 GB LPDDR4 RAM]   \n",
       "1         [Intel Core i5 Processor]     [(11th Gen)8 GB DDR4 RAM]   \n",
       "2  [AMD Athlon Dual Core Processor]               [8 GB DDR4 RAM]   \n",
       "3              [Apple M2 Processor]     [8 GB Unified Memory RAM]   \n",
       "4         [Intel Core i3 Processor]  [(10th Gen)8 GB LPDDR4X RAM]   \n",
       "\n",
       "                                     OS       Storage  \\\n",
       "0            [Android Operating System]            []   \n",
       "1         [Windows 11 Operating System]  [512 GB SSD]   \n",
       "2         [Windows 11 Operating System]  [512 GB SSD]   \n",
       "3             [Mac OS Operating System]  [256 GB SSD]   \n",
       "4  [64 bit Windows 11 Operating System]  [512 GB SSD]   \n",
       "\n",
       "                          Display  \n",
       "0  [29.46 cm (11.6 Inch) Display]  \n",
       "1  [39.62 cm (15.6 Inch) Display]  \n",
       "2  [39.62 cm (15.6 Inch) Display]  \n",
       "3  [34.54 cm (13.6 Inch) Display]  \n",
       "4  [39.62 cm (15.6 inch) Display]  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Display\n",
    "\n",
    "regex = r'\\d+\\.?\\d+\\scm.*Display'\n",
    "\n",
    "df['Display'] = df['Product Feature'].apply(lambda x : re.findall(regex, x))\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "96a1f508-35c9-4bbe-820e-4f3f1156168f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "      <th>Processor</th>\n",
       "      <th>RAM</th>\n",
       "      <th>OS</th>\n",
       "      <th>Storage</th>\n",
       "      <th>Display</th>\n",
       "      <th>Warranty</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>[Primebook]</td>\n",
       "      <td>[MediaTek MT8183 Processor]</td>\n",
       "      <td>[4 GB LPDDR4 RAM]</td>\n",
       "      <td>[Android Operating System]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[29.46 cm (11.6 Inch) Display]</td>\n",
       "      <td>[1 Year Pick and Drop Warranty]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ASUS TUF Gaming F15 - AI Powered Gaming Core i...</td>\n",
       "      <td>₹51,990</td>\n",
       "      <td>4.3</td>\n",
       "      <td>1,768 Ratings &amp; 177 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...</td>\n",
       "      <td>[ASUS]</td>\n",
       "      <td>[Intel Core i5 Processor]</td>\n",
       "      <td>[(11th Gen)8 GB DDR4 RAM]</td>\n",
       "      <td>[Windows 11 Operating System]</td>\n",
       "      <td>[512 GB SSD]</td>\n",
       "      <td>[39.62 cm (15.6 Inch) Display]</td>\n",
       "      <td>[1 Year Carry-in Warranty]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...</td>\n",
       "      <td>₹26,990</td>\n",
       "      <td>4.1</td>\n",
       "      <td>2,776 Ratings &amp; 227 Reviews</td>\n",
       "      <td>AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...</td>\n",
       "      <td>[HP]</td>\n",
       "      <td>[AMD Athlon Dual Core Processor]</td>\n",
       "      <td>[8 GB DDR4 RAM]</td>\n",
       "      <td>[Windows 11 Operating System]</td>\n",
       "      <td>[512 GB SSD]</td>\n",
       "      <td>[39.62 cm (15.6 Inch) Display]</td>\n",
       "      <td>[1 Year Onsite Warranty]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...</td>\n",
       "      <td>₹87,990</td>\n",
       "      <td>4.7</td>\n",
       "      <td>3,207 Ratings &amp; 252 Reviews</td>\n",
       "      <td>Apple M2 Processor8 GB Unified Memory RAMMac O...</td>\n",
       "      <td>[APPLE]</td>\n",
       "      <td>[Apple M2 Processor]</td>\n",
       "      <td>[8 GB Unified Memory RAM]</td>\n",
       "      <td>[Mac OS Operating System]</td>\n",
       "      <td>[256 GB SSD]</td>\n",
       "      <td>[34.54 cm (13.6 Inch) Display]</td>\n",
       "      <td>[1 Year Limited Warranty]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infinix INBook Y1 Plus Intel Core i3 10th Gen ...</td>\n",
       "      <td>₹23,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>3,042 Ratings &amp; 387 Reviews</td>\n",
       "      <td>Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...</td>\n",
       "      <td>[Infinix]</td>\n",
       "      <td>[Intel Core i3 Processor]</td>\n",
       "      <td>[(10th Gen)8 GB LPDDR4X RAM]</td>\n",
       "      <td>[64 bit Windows 11 Operating System]</td>\n",
       "      <td>[512 GB SSD]</td>\n",
       "      <td>[39.62 cm (15.6 inch) Display]</td>\n",
       "      <td>[1 Year Onsite Warranty]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       Product Title Product Price  \\\n",
       "0  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "1  ASUS TUF Gaming F15 - AI Powered Gaming Core i...       ₹51,990   \n",
       "2  HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...       ₹26,990   \n",
       "3  APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...       ₹87,990   \n",
       "4  Infinix INBook Y1 Plus Intel Core i3 10th Gen ...       ₹23,990   \n",
       "\n",
       "   Product Rating               Product Review  \\\n",
       "0             4.2    773 Ratings & 207 Reviews   \n",
       "1             4.3  1,768 Ratings & 177 Reviews   \n",
       "2             4.1  2,776 Ratings & 227 Reviews   \n",
       "3             4.7  3,207 Ratings & 252 Reviews   \n",
       "4             4.2  3,042 Ratings & 387 Reviews   \n",
       "\n",
       "                                     Product Feature        Brand  \\\n",
       "0  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  [Primebook]   \n",
       "1  Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...       [ASUS]   \n",
       "2  AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...         [HP]   \n",
       "3  Apple M2 Processor8 GB Unified Memory RAMMac O...      [APPLE]   \n",
       "4  Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...    [Infinix]   \n",
       "\n",
       "                          Processor                           RAM  \\\n",
       "0       [MediaTek MT8183 Processor]             [4 GB LPDDR4 RAM]   \n",
       "1         [Intel Core i5 Processor]     [(11th Gen)8 GB DDR4 RAM]   \n",
       "2  [AMD Athlon Dual Core Processor]               [8 GB DDR4 RAM]   \n",
       "3              [Apple M2 Processor]     [8 GB Unified Memory RAM]   \n",
       "4         [Intel Core i3 Processor]  [(10th Gen)8 GB LPDDR4X RAM]   \n",
       "\n",
       "                                     OS       Storage  \\\n",
       "0            [Android Operating System]            []   \n",
       "1         [Windows 11 Operating System]  [512 GB SSD]   \n",
       "2         [Windows 11 Operating System]  [512 GB SSD]   \n",
       "3             [Mac OS Operating System]  [256 GB SSD]   \n",
       "4  [64 bit Windows 11 Operating System]  [512 GB SSD]   \n",
       "\n",
       "                          Display                         Warranty  \n",
       "0  [29.46 cm (11.6 Inch) Display]  [1 Year Pick and Drop Warranty]  \n",
       "1  [39.62 cm (15.6 Inch) Display]       [1 Year Carry-in Warranty]  \n",
       "2  [39.62 cm (15.6 Inch) Display]         [1 Year Onsite Warranty]  \n",
       "3  [34.54 cm (13.6 Inch) Display]        [1 Year Limited Warranty]  \n",
       "4  [39.62 cm (15.6 inch) Display]         [1 Year Onsite Warranty]  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Warranty\n",
    "\n",
    "regex = r'\\d+\\sYear.*Warranty'\n",
    "\n",
    "df['Warranty'] = df['Product Feature'].apply(lambda x : re.findall(regex, x))\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2e7b1f89-fa9e-4d83-9ce2-a5fd7ceab1d8",
   "metadata": {},
   "source": [
    "## Fixing the Issues"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "6925393e-2bc0-4475-80f9-66cc60144070",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(984, 12)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "87db626a-9d44-4285-84c0-fea7d02c564e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Product Title        0\n",
       "Product Price        1\n",
       "Product Rating     119\n",
       "Product Review     119\n",
       "Product Feature      0\n",
       "Brand                0\n",
       "Processor            0\n",
       "RAM                  0\n",
       "OS                   0\n",
       "Storage              0\n",
       "Display              0\n",
       "Warranty             0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "17d01215-b062-481a-9bee-09cda186e604",
   "metadata": {},
   "outputs": [],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5e869a36-8ed0-49b6-889c-aa0d6fd36d47",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Missing Values\n",
    "\n",
    "df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "185ffb70-5552-4ecd-bf02-389c8743512c",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(df['Processor'][0])\n",
    "\n",
    "print(type(df['Processor'][0]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8d09bd1b-b141-4527-92b2-57d9d5a3a50d",
   "metadata": {},
   "outputs": [],
   "source": [
    "print(''.join(df['Processor'][0]))\n",
    "print(type(''.join(df['Processor'][0])))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e63fae5e-5f74-4a47-b213-c0e5b3f76949",
   "metadata": {},
   "outputs": [],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "2258dde4-39f2-492a-aa70-eb2c1e0d9e29",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Product Title        0\n",
       "Product Price        1\n",
       "Product Rating     119\n",
       "Product Review     119\n",
       "Product Feature      0\n",
       "Brand                0\n",
       "Processor            0\n",
       "RAM                  0\n",
       "OS                   0\n",
       "Storage              0\n",
       "Display              0\n",
       "Warranty             0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.Processor = df.Processor.apply(lambda x : ''.join(x))\n",
    "df.RAM = df.RAM.apply(lambda x : ''.join(x))\n",
    "df.OS = df.OS.apply(lambda x : ''.join(x))\n",
    "df.Storage = df.Storage.apply(lambda x : ''.join(x))\n",
    "df.Brand = df.Brand.apply(lambda x : ''.join(x))\n",
    "df.Display = df.Display.apply(lambda x : ''.join(x))\n",
    "df.Warranty = df.Warranty.apply(lambda x : ''.join(x))\n",
    "\n",
    "df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "058f822c-ff2e-4662-bf7f-43794a058c2e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Product Title        0\n",
       "Product Price        1\n",
       "Product Rating     119\n",
       "Product Review     119\n",
       "Product Feature      0\n",
       "Brand                0\n",
       "Processor            1\n",
       "RAM                  0\n",
       "OS                  47\n",
       "Storage            218\n",
       "Display              0\n",
       "Warranty           104\n",
       "dtype: int64"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = df.replace('', np.nan)\n",
    "\n",
    "df.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "75cd4026-2b8e-4125-9fbb-5ec8896e7b39",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "      <th>Processor</th>\n",
       "      <th>RAM</th>\n",
       "      <th>OS</th>\n",
       "      <th>Storage</th>\n",
       "      <th>Display</th>\n",
       "      <th>Warranty</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8183 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Lenovo Lenovo V15 Celeron Dual Core 4th Gen - ...</td>\n",
       "      <td>₹19,990</td>\n",
       "      <td>4.0</td>\n",
       "      <td>1,152 Ratings &amp; 90 Reviews</td>\n",
       "      <td>Intel Celeron Dual Core Processor (4th Gen)8 G...</td>\n",
       "      <td>Lenovo</td>\n",
       "      <td>Intel Celeron Dual Core Processor</td>\n",
       "      <td>(4th Gen)8 GB DDR4 RAM</td>\n",
       "      <td>64 bit Windows 11 Operating System</td>\n",
       "      <td>256 GB SSD</td>\n",
       "      <td>39.62 cm (15.6 inch) Display</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Primebook S Wifi MT8183 - (4 GB/128 GB EMMC St...</td>\n",
       "      <td>₹10,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>324 Ratings &amp; 97 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8183 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>Primebook 4G Android Based MediaTek MT8788 - (...</td>\n",
       "      <td>₹12,490</td>\n",
       "      <td>4.1</td>\n",
       "      <td>1,176 Ratings &amp; 350 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMPrime ...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>Primebook 4G Android Based MediaTek MT8788 - (...</td>\n",
       "      <td>₹11,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>2,180 Ratings &amp; 690 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>969</th>\n",
       "      <td>MICROSOFT Surface Laptop 5 Core i5 12th Gen 12...</td>\n",
       "      <td>₹1,07,999</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Intel Core i5 Processor (12th Gen)8 GB LPDDR5 ...</td>\n",
       "      <td>MICROSOFT</td>\n",
       "      <td>Intel Core i5 Processor</td>\n",
       "      <td>(12th Gen)8 GB LPDDR5 RAM</td>\n",
       "      <td>Windows 11 Operating System</td>\n",
       "      <td>256 GB SSD</td>\n",
       "      <td>34.29 cm (13.5 Inch) Touchscreen Display</td>\n",
       "      <td>1 Year Carry-in Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>971</th>\n",
       "      <td>Primebook 4G Android Based MediaTek MT8788 - (...</td>\n",
       "      <td>₹11,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>2,180 Ratings &amp; 690 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>973</th>\n",
       "      <td>HP Victus Core i7 13th Gen 13700H - (16 GB/512...</td>\n",
       "      <td>₹1,19,500</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Intel Core i7 Processor (13th Gen)16 GB DDR4 R...</td>\n",
       "      <td>HP</td>\n",
       "      <td>Intel Core i7 Processor</td>\n",
       "      <td>(13th Gen)16 GB DDR4 RAM</td>\n",
       "      <td>Windows 11 Operating System</td>\n",
       "      <td>512 GB SSD</td>\n",
       "      <td>39.62 cm (15.6 Inch) Display</td>\n",
       "      <td>1 Year Onsite Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>977</th>\n",
       "      <td>Primebook 4G enabled Android based MediaTek MT...</td>\n",
       "      <td>₹15,606</td>\n",
       "      <td>4.1</td>\n",
       "      <td>1,176 Ratings &amp; 350 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>27.94 cm (11 Inch) Display</td>\n",
       "      <td>1 Year Onsite Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>979</th>\n",
       "      <td>ASUS TUF Gaming F15 Core i5 10th Gen i5-10300H...</td>\n",
       "      <td>₹67,990</td>\n",
       "      <td>4.5</td>\n",
       "      <td>177 Ratings &amp; 15 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (10th Gen)8 GB DDR4 RA...</td>\n",
       "      <td>ASUS</td>\n",
       "      <td>Intel Core i5 Processor</td>\n",
       "      <td>(10th Gen)8 GB DDR4 RAM</td>\n",
       "      <td>64 bit Windows 11 Operating System</td>\n",
       "      <td>1 TB SSD</td>\n",
       "      <td>39.62 cm (15.6 inch) Display</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>410 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                         Product Title Product Price  \\\n",
       "0    Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "6    Lenovo Lenovo V15 Celeron Dual Core 4th Gen - ...       ₹19,990   \n",
       "7    Primebook S Wifi MT8183 - (4 GB/128 GB EMMC St...       ₹10,990   \n",
       "10   Primebook 4G Android Based MediaTek MT8788 - (...       ₹12,490   \n",
       "11   Primebook 4G Android Based MediaTek MT8788 - (...       ₹11,990   \n",
       "..                                                 ...           ...   \n",
       "969  MICROSOFT Surface Laptop 5 Core i5 12th Gen 12...     ₹1,07,999   \n",
       "971  Primebook 4G Android Based MediaTek MT8788 - (...       ₹11,990   \n",
       "973  HP Victus Core i7 13th Gen 13700H - (16 GB/512...     ₹1,19,500   \n",
       "977  Primebook 4G enabled Android based MediaTek MT...       ₹15,606   \n",
       "979  ASUS TUF Gaming F15 Core i5 10th Gen i5-10300H...       ₹67,990   \n",
       "\n",
       "     Product Rating               Product Review  \\\n",
       "0               4.2    773 Ratings & 207 Reviews   \n",
       "6               4.0   1,152 Ratings & 90 Reviews   \n",
       "7               4.2     324 Ratings & 97 Reviews   \n",
       "10              4.1  1,176 Ratings & 350 Reviews   \n",
       "11              4.2  2,180 Ratings & 690 Reviews   \n",
       "..              ...                          ...   \n",
       "969             NaN                          NaN   \n",
       "971             4.2  2,180 Ratings & 690 Reviews   \n",
       "973             NaN                          NaN   \n",
       "977             4.1  1,176 Ratings & 350 Reviews   \n",
       "979             4.5     177 Ratings & 15 Reviews   \n",
       "\n",
       "                                       Product Feature      Brand  \\\n",
       "0    MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "6    Intel Celeron Dual Core Processor (4th Gen)8 G...     Lenovo   \n",
       "7    MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "10   MediaTek MT8788 Processor4 GB LPDDR4 RAMPrime ...  Primebook   \n",
       "11   MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "..                                                 ...        ...   \n",
       "969  Intel Core i5 Processor (12th Gen)8 GB LPDDR5 ...  MICROSOFT   \n",
       "971  MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "973  Intel Core i7 Processor (13th Gen)16 GB DDR4 R...         HP   \n",
       "977  MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "979  Intel Core i5 Processor (10th Gen)8 GB DDR4 RA...       ASUS   \n",
       "\n",
       "                             Processor                        RAM  \\\n",
       "0            MediaTek MT8183 Processor            4 GB LPDDR4 RAM   \n",
       "6    Intel Celeron Dual Core Processor     (4th Gen)8 GB DDR4 RAM   \n",
       "7            MediaTek MT8183 Processor            4 GB LPDDR4 RAM   \n",
       "10           MediaTek MT8788 Processor            4 GB LPDDR4 RAM   \n",
       "11           MediaTek MT8788 Processor            4 GB LPDDR4 RAM   \n",
       "..                                 ...                        ...   \n",
       "969            Intel Core i5 Processor  (12th Gen)8 GB LPDDR5 RAM   \n",
       "971          MediaTek MT8788 Processor            4 GB LPDDR4 RAM   \n",
       "973            Intel Core i7 Processor   (13th Gen)16 GB DDR4 RAM   \n",
       "977          MediaTek MT8788 Processor            4 GB LPDDR4 RAM   \n",
       "979            Intel Core i5 Processor    (10th Gen)8 GB DDR4 RAM   \n",
       "\n",
       "                                     OS     Storage  \\\n",
       "0              Android Operating System         NaN   \n",
       "6    64 bit Windows 11 Operating System  256 GB SSD   \n",
       "7              Android Operating System         NaN   \n",
       "10                                  NaN         NaN   \n",
       "11             Android Operating System         NaN   \n",
       "..                                  ...         ...   \n",
       "969         Windows 11 Operating System  256 GB SSD   \n",
       "971            Android Operating System         NaN   \n",
       "973         Windows 11 Operating System  512 GB SSD   \n",
       "977            Android Operating System         NaN   \n",
       "979  64 bit Windows 11 Operating System    1 TB SSD   \n",
       "\n",
       "                                      Display                       Warranty  \n",
       "0                29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "6                39.62 cm (15.6 inch) Display                            NaN  \n",
       "7                29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "10               29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "11               29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "..                                        ...                            ...  \n",
       "969  34.29 cm (13.5 Inch) Touchscreen Display       1 Year Carry-in Warranty  \n",
       "971              29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "973              39.62 cm (15.6 Inch) Display         1 Year Onsite Warranty  \n",
       "977                27.94 cm (11 Inch) Display         1 Year Onsite Warranty  \n",
       "979              39.62 cm (15.6 inch) Display                            NaN  \n",
       "\n",
       "[410 rows x 12 columns]"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df.isnull().any(axis=1)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "426b8762-de85-48cf-86c7-b4e09447ef7f",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "      <th>Processor</th>\n",
       "      <th>RAM</th>\n",
       "      <th>OS</th>\n",
       "      <th>Storage</th>\n",
       "      <th>Display</th>\n",
       "      <th>Warranty</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8183 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Primebook S Wifi MT8183 - (4 GB/128 GB EMMC St...</td>\n",
       "      <td>₹10,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>324 Ratings &amp; 97 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8183 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>Primebook 4G Android Based MediaTek MT8788 - (...</td>\n",
       "      <td>₹12,490</td>\n",
       "      <td>4.1</td>\n",
       "      <td>1,176 Ratings &amp; 350 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMPrime ...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>Primebook 4G Android Based MediaTek MT8788 - (...</td>\n",
       "      <td>₹11,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>2,180 Ratings &amp; 690 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>Primebook 4G enabled Android based MediaTek MT...</td>\n",
       "      <td>₹15,606</td>\n",
       "      <td>4.1</td>\n",
       "      <td>1,176 Ratings &amp; 350 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>27.94 cm (11 Inch) Display</td>\n",
       "      <td>1 Year Onsite Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>960</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>₹8,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8183 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>966</th>\n",
       "      <td>Primebook S Wifi MT8183 - (4 GB/128 GB EMMC St...</td>\n",
       "      <td>₹10,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>324 Ratings &amp; 97 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8183 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>967</th>\n",
       "      <td>Primebook 4G Android Based MediaTek MT8788 - (...</td>\n",
       "      <td>₹12,490</td>\n",
       "      <td>4.1</td>\n",
       "      <td>1,176 Ratings &amp; 350 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMPrime ...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>971</th>\n",
       "      <td>Primebook 4G Android Based MediaTek MT8788 - (...</td>\n",
       "      <td>₹11,990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>2,180 Ratings &amp; 690 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>977</th>\n",
       "      <td>Primebook 4G enabled Android based MediaTek MT...</td>\n",
       "      <td>₹15,606</td>\n",
       "      <td>4.1</td>\n",
       "      <td>1,176 Ratings &amp; 350 Reviews</td>\n",
       "      <td>MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8788 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>27.94 cm (11 Inch) Display</td>\n",
       "      <td>1 Year Onsite Warranty</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>218 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                         Product Title Product Price  \\\n",
       "0    Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "7    Primebook S Wifi MT8183 - (4 GB/128 GB EMMC St...       ₹10,990   \n",
       "10   Primebook 4G Android Based MediaTek MT8788 - (...       ₹12,490   \n",
       "11   Primebook 4G Android Based MediaTek MT8788 - (...       ₹11,990   \n",
       "17   Primebook 4G enabled Android based MediaTek MT...       ₹15,606   \n",
       "..                                                 ...           ...   \n",
       "960  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...        ₹8,990   \n",
       "966  Primebook S Wifi MT8183 - (4 GB/128 GB EMMC St...       ₹10,990   \n",
       "967  Primebook 4G Android Based MediaTek MT8788 - (...       ₹12,490   \n",
       "971  Primebook 4G Android Based MediaTek MT8788 - (...       ₹11,990   \n",
       "977  Primebook 4G enabled Android based MediaTek MT...       ₹15,606   \n",
       "\n",
       "     Product Rating               Product Review  \\\n",
       "0               4.2    773 Ratings & 207 Reviews   \n",
       "7               4.2     324 Ratings & 97 Reviews   \n",
       "10              4.1  1,176 Ratings & 350 Reviews   \n",
       "11              4.2  2,180 Ratings & 690 Reviews   \n",
       "17              4.1  1,176 Ratings & 350 Reviews   \n",
       "..              ...                          ...   \n",
       "960             4.2    773 Ratings & 207 Reviews   \n",
       "966             4.2     324 Ratings & 97 Reviews   \n",
       "967             4.1  1,176 Ratings & 350 Reviews   \n",
       "971             4.2  2,180 Ratings & 690 Reviews   \n",
       "977             4.1  1,176 Ratings & 350 Reviews   \n",
       "\n",
       "                                       Product Feature      Brand  \\\n",
       "0    MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "7    MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "10   MediaTek MT8788 Processor4 GB LPDDR4 RAMPrime ...  Primebook   \n",
       "11   MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "17   MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "..                                                 ...        ...   \n",
       "960  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "966  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "967  MediaTek MT8788 Processor4 GB LPDDR4 RAMPrime ...  Primebook   \n",
       "971  MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "977  MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "\n",
       "                     Processor              RAM                        OS  \\\n",
       "0    MediaTek MT8183 Processor  4 GB LPDDR4 RAM  Android Operating System   \n",
       "7    MediaTek MT8183 Processor  4 GB LPDDR4 RAM  Android Operating System   \n",
       "10   MediaTek MT8788 Processor  4 GB LPDDR4 RAM                       NaN   \n",
       "11   MediaTek MT8788 Processor  4 GB LPDDR4 RAM  Android Operating System   \n",
       "17   MediaTek MT8788 Processor  4 GB LPDDR4 RAM  Android Operating System   \n",
       "..                         ...              ...                       ...   \n",
       "960  MediaTek MT8183 Processor  4 GB LPDDR4 RAM  Android Operating System   \n",
       "966  MediaTek MT8183 Processor  4 GB LPDDR4 RAM  Android Operating System   \n",
       "967  MediaTek MT8788 Processor  4 GB LPDDR4 RAM                       NaN   \n",
       "971  MediaTek MT8788 Processor  4 GB LPDDR4 RAM  Android Operating System   \n",
       "977  MediaTek MT8788 Processor  4 GB LPDDR4 RAM  Android Operating System   \n",
       "\n",
       "    Storage                       Display                       Warranty  \n",
       "0       NaN  29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "7       NaN  29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "10      NaN  29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "11      NaN  29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "17      NaN    27.94 cm (11 Inch) Display         1 Year Onsite Warranty  \n",
       "..      ...                           ...                            ...  \n",
       "960     NaN  29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "966     NaN  29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "967     NaN  29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "971     NaN  29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "977     NaN    27.94 cm (11 Inch) Display         1 Year Onsite Warranty  \n",
       "\n",
       "[218 rows x 12 columns]"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['Storage'].isnull()]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "80f1af30-c06c-4572-af4a-e12a0f1505e6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'MediaTek MT8788 Processor4 GB LPDDR4 RAMAndroid Operating System27.94 cm (11 Inch) Display1 Year Onsite Warranty'"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.loc[977, \"Product Feature\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "7c32250b-220b-4db2-9dde-2f71b8ba2873",
   "metadata": {},
   "outputs": [],
   "source": [
    "df['Product Price'] = df['Product Price'].str.replace(',', '').str.replace('₹', '')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "7ef910b6-1d6b-49cc-8244-b88ea26a56ea",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Product Title</th>\n",
       "      <th>Product Price</th>\n",
       "      <th>Product Rating</th>\n",
       "      <th>Product Review</th>\n",
       "      <th>Product Feature</th>\n",
       "      <th>Brand</th>\n",
       "      <th>Processor</th>\n",
       "      <th>RAM</th>\n",
       "      <th>OS</th>\n",
       "      <th>Storage</th>\n",
       "      <th>Display</th>\n",
       "      <th>Warranty</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...</td>\n",
       "      <td>8990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>773 Ratings &amp; 207 Reviews</td>\n",
       "      <td>MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...</td>\n",
       "      <td>Primebook</td>\n",
       "      <td>MediaTek MT8183 Processor</td>\n",
       "      <td>4 GB LPDDR4 RAM</td>\n",
       "      <td>Android Operating System</td>\n",
       "      <td>NaN</td>\n",
       "      <td>29.46 cm (11.6 Inch) Display</td>\n",
       "      <td>1 Year Pick and Drop Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ASUS TUF Gaming F15 - AI Powered Gaming Core i...</td>\n",
       "      <td>51990</td>\n",
       "      <td>4.3</td>\n",
       "      <td>1,768 Ratings &amp; 177 Reviews</td>\n",
       "      <td>Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...</td>\n",
       "      <td>ASUS</td>\n",
       "      <td>Intel Core i5 Processor</td>\n",
       "      <td>(11th Gen)8 GB DDR4 RAM</td>\n",
       "      <td>Windows 11 Operating System</td>\n",
       "      <td>512 GB SSD</td>\n",
       "      <td>39.62 cm (15.6 Inch) Display</td>\n",
       "      <td>1 Year Carry-in Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...</td>\n",
       "      <td>26990</td>\n",
       "      <td>4.1</td>\n",
       "      <td>2,776 Ratings &amp; 227 Reviews</td>\n",
       "      <td>AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...</td>\n",
       "      <td>HP</td>\n",
       "      <td>AMD Athlon Dual Core Processor</td>\n",
       "      <td>8 GB DDR4 RAM</td>\n",
       "      <td>Windows 11 Operating System</td>\n",
       "      <td>512 GB SSD</td>\n",
       "      <td>39.62 cm (15.6 Inch) Display</td>\n",
       "      <td>1 Year Onsite Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...</td>\n",
       "      <td>87990</td>\n",
       "      <td>4.7</td>\n",
       "      <td>3,207 Ratings &amp; 252 Reviews</td>\n",
       "      <td>Apple M2 Processor8 GB Unified Memory RAMMac O...</td>\n",
       "      <td>APPLE</td>\n",
       "      <td>Apple M2 Processor</td>\n",
       "      <td>8 GB Unified Memory RAM</td>\n",
       "      <td>Mac OS Operating System</td>\n",
       "      <td>256 GB SSD</td>\n",
       "      <td>34.54 cm (13.6 Inch) Display</td>\n",
       "      <td>1 Year Limited Warranty</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Infinix INBook Y1 Plus Intel Core i3 10th Gen ...</td>\n",
       "      <td>23990</td>\n",
       "      <td>4.2</td>\n",
       "      <td>3,042 Ratings &amp; 387 Reviews</td>\n",
       "      <td>Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...</td>\n",
       "      <td>Infinix</td>\n",
       "      <td>Intel Core i3 Processor</td>\n",
       "      <td>(10th Gen)8 GB LPDDR4X RAM</td>\n",
       "      <td>64 bit Windows 11 Operating System</td>\n",
       "      <td>512 GB SSD</td>\n",
       "      <td>39.62 cm (15.6 inch) Display</td>\n",
       "      <td>1 Year Onsite Warranty</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       Product Title Product Price  \\\n",
       "0  Primebook Wifi MT8183 - (4 GB/64 GB EMMC Stora...          8990   \n",
       "1  ASUS TUF Gaming F15 - AI Powered Gaming Core i...         51990   \n",
       "2  HP 2023 Athlon Dual Core 3050U - (8 GB/512 GB ...         26990   \n",
       "3  APPLE 2022 MacBook AIR M2 - (8 GB/256 GB SSD/M...         87990   \n",
       "4  Infinix INBook Y1 Plus Intel Core i3 10th Gen ...         23990   \n",
       "\n",
       "   Product Rating               Product Review  \\\n",
       "0             4.2    773 Ratings & 207 Reviews   \n",
       "1             4.3  1,768 Ratings & 177 Reviews   \n",
       "2             4.1  2,776 Ratings & 227 Reviews   \n",
       "3             4.7  3,207 Ratings & 252 Reviews   \n",
       "4             4.2  3,042 Ratings & 387 Reviews   \n",
       "\n",
       "                                     Product Feature      Brand  \\\n",
       "0  MediaTek MT8183 Processor4 GB LPDDR4 RAMAndroi...  Primebook   \n",
       "1  Intel Core i5 Processor (11th Gen)8 GB DDR4 RA...       ASUS   \n",
       "2  AMD Athlon Dual Core Processor8 GB DDR4 RAMWin...         HP   \n",
       "3  Apple M2 Processor8 GB Unified Memory RAMMac O...      APPLE   \n",
       "4  Intel Core i3 Processor (10th Gen)8 GB LPDDR4X...    Infinix   \n",
       "\n",
       "                        Processor                         RAM  \\\n",
       "0       MediaTek MT8183 Processor             4 GB LPDDR4 RAM   \n",
       "1         Intel Core i5 Processor     (11th Gen)8 GB DDR4 RAM   \n",
       "2  AMD Athlon Dual Core Processor               8 GB DDR4 RAM   \n",
       "3              Apple M2 Processor     8 GB Unified Memory RAM   \n",
       "4         Intel Core i3 Processor  (10th Gen)8 GB LPDDR4X RAM   \n",
       "\n",
       "                                   OS     Storage  \\\n",
       "0            Android Operating System         NaN   \n",
       "1         Windows 11 Operating System  512 GB SSD   \n",
       "2         Windows 11 Operating System  512 GB SSD   \n",
       "3             Mac OS Operating System  256 GB SSD   \n",
       "4  64 bit Windows 11 Operating System  512 GB SSD   \n",
       "\n",
       "                        Display                       Warranty  \n",
       "0  29.46 cm (11.6 Inch) Display  1 Year Pick and Drop Warranty  \n",
       "1  39.62 cm (15.6 Inch) Display       1 Year Carry-in Warranty  \n",
       "2  39.62 cm (15.6 Inch) Display         1 Year Onsite Warranty  \n",
       "3  34.54 cm (13.6 Inch) Display        1 Year Limited Warranty  \n",
       "4  39.62 cm (15.6 inch) Display         1 Year Onsite Warranty  "
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "bbe22c4d-bd9e-494f-9aaf-260fb22f3ce0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 984 entries, 0 to 983\n",
      "Data columns (total 12 columns):\n",
      " #   Column           Non-Null Count  Dtype  \n",
      "---  ------           --------------  -----  \n",
      " 0   Product Title    984 non-null    object \n",
      " 1   Product Price    983 non-null    object \n",
      " 2   Product Rating   865 non-null    float64\n",
      " 3   Product Review   865 non-null    object \n",
      " 4   Product Feature  984 non-null    object \n",
      " 5   Brand            984 non-null    object \n",
      " 6   Processor        983 non-null    object \n",
      " 7   RAM              984 non-null    object \n",
      " 8   OS               937 non-null    object \n",
      " 9   Storage          766 non-null    object \n",
      " 10  Display          984 non-null    object \n",
      " 11  Warranty         880 non-null    object \n",
      "dtypes: float64(1), object(11)\n",
      "memory usage: 92.4+ KB\n"
     ]
    }
   ],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "56eba3e7-97cf-45b5-8c8e-b9f69f0f53ae",
   "metadata": {},
   "outputs": [],
   "source": [
    "df['Product Price'] = df['Product Price'].astype('float')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "9975bf6c-eecf-447d-a0cc-42ee5d9b61bc",
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_csv(\"data/laptop_clean_data.csv\", index=False)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
